#include<iostream>
using namespace std;
int main()
{
    string a;
    cin>>a;
    //cout<<a[0]<<a[3]<<a[2];
    if(a[3]!=0)
    {

        cout<<"YES";
    }
    else
        cout<<"NO";
    return 0;

}
